package com.corner.ui.parcel;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Administrator on 2015/7/23，23.51.
 * 描述：
 */
public class PoiItem implements Parcelable {
    public static final Parcelable.Creator<PoiItem> CREATOR = new Parcelable.Creator<PoiItem>() {
        public PoiItem createFromParcel(Parcel source) {
            return new PoiItem(source);
        }

        public PoiItem[] newArray(int size) {
            return new PoiItem[size];
        }
    };
    public double latitude;
    public double longtitude;
    public String address;
    public String name;
    public String provice;
    public String city;

    public PoiItem(double latitude, double longtitude, String address, String name, String provice, String city) {
        this.latitude = latitude;
        this.longtitude = longtitude;
        this.address = address;
        this.name = name;
        this.provice = provice;
        this.city = city;
    }

    public PoiItem() {
    }

    protected PoiItem(Parcel in) {
        this.latitude = in.readDouble();
        this.longtitude = in.readDouble();
        this.address = in.readString();
        this.name = in.readString();
        this.provice = in.readString();
        this.city = in.readString();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeDouble(this.latitude);
        dest.writeDouble(this.longtitude);
        dest.writeString(this.address);
        dest.writeString(this.name);
        dest.writeString(this.provice);
        dest.writeString(this.city);
    }
}